class AdminController < ApplicationController
  
  def login
    if request.post?
      user = User.authenticate(params[:login],params[:pass])
      if user
        session[:user_id] = user.id
        redirect_to(:controller => 'home', :action => 'index')        
      end     
    end
  end

  def logout
  end

  def index
    redirect_to(:action => "login")
  end 
  

end
